#include <stdio.h>

int fib(int n);

int main(int argc,char *argv[])
{
    int n = 1;
    int num;

    printf("Please input:");
    scanf("%d",&num);

    while(n <= num)
	{
	fib(n);
        printf("%d  ",fib(n));
        n++;
    }
    printf("\n");
    return 0;
}
int j=0;
int  fib(int n)
{
	int i;
	if(n == 1 || n ==2)
        return 1;

	i = fib(n-1) + fib(n-2),
   	
	j++;
//	 printf("求和=%d|| n=%d   ",i, n);
	if (j == 3) {
//		printf("\n");
		j = 0;
	}

	return i;
}
